//****************************************************************/
//Creation History
// Company: GZ office
// NAME:    CostCenterOptions.java
// TITLE:   Cost Center Column Accessibility Maintenance 
// BY:      Oscar Bai
// DATE:    03/03/2003
//******************************************************************/
//Modification History
//******************************************************************/
//******************************************************************/

package admin.options;

import com.ffpc.html.Options;

import java.util.ArrayList;
import java.sql.Connection;

import admin.system.costcenter.*;

public class CostCenterOptions
  extends Options
{
  /**
   * Constructor
   */
  public CostCenterOptions() {
      this.load();
  }

  @Override
protected ArrayList createOptions(Connection con)
    throws Exception
  {
      ArrayList options = new ArrayList();
      CostCenterBean costCenter = CostCenterProcess.createBean();
      costCenter.setCost_Center_id("");
      CostCenterBean[] costCenters = CostCenterProcess.find(con,costCenter);
      for (int i=0; i<costCenters.length; i++)
      {
          Options.Option option
          = new Options.Option( costCenters[i].getCost_Center_id(),
                                costCenters[i].getCost_Center_id());
          options.add(i,option);
      }
      return options;
  }
}

